import { fromJS } from 'immutable';
import * as constants from './constants';

const defaultState = fromJS({
  files: []
});

// const getCon = (state, action) => {
// 	return state.merge({
//     'databaseConfig': action.databaseConfig,
//     'basicInfo': action.basicInfo,
//     'database': action.database,
// 	});
// };

export default(state=defaultState, action) => {
  switch(action.type){
    case constants.GET_FILES:
      return state.set('files',action.files);
    default: return state;
  }
}